---
title: '<img> tags with style= attribute set'
slug: Web/Images/Styled
---

<h3>No flaws</h3>

<figure>
  <img src="../florian.png" alt="Mugshot picture">
  <figcaption>A perfectly good picture using <code>../florian.png</code> and no <code>style</code></figcaption>
</figure>

<figure>
  <img src="../../foo/screenshot.png" alt="Screenshot from grand-sibling document"
    style="border-radius: 100px;">
  <figcaption>An image that has <code>style=</code> attribute but no mention of
    <code>width</code> in its value.</figcaption>
</figure>


<hr>

<h3>Flaws all over the shop</h3>

<figure>
  <img src="../florian.png" alt="Mugshot picture"
   style="width: 256px;  height:128px">
  <figcaption>
    An image that should have its entire <code>style=</code> attribute removed.
  </figcaption>
</figure>

<figure>
  <img src="../florian.png" alt="Slightly different 'alt' text"
   style="width: 256px;  height:128px">
  <figcaption>
    Same as the one above but with a different <code>alt=</code> attribute.
  </figcaption>
</figure>

<figure>
  <img src="../../foo/screenshot.png" alt="Screenshot from grand-sibling document"
    style="width:300px;border-radius: 100px; max-width: 1000px;  height: 128px;">
  <figcaption>An image that has <code>style=</code> attribute but no mention of
    <code>width</code> in its value.</figcaption>
</figure>
